package DuoJiCheng_animal;

public class Animal {
	protected String name=null;
	
	public Animal(String name){
		this.name=name;
	}
	
	public void	Eat() {
		System.out.println("eat food");
	}
}

class Dog extends Animal{
	public Dog(String nameDog) {
		super(nameDog);
	}
	
	public void Bar() {
		System.out.println("woof woof");
	}
}


